<?php
$this->widget('bootstrap.widgets.TbBreadcrumbs', array(
		'links'=>array('Rules'=>array('index'), $model->id),
));
$this->menu=array(
	array('label'=>'List Rule','url'=>array('index')),
	array('label'=>'Create Rule','url'=>array('create')),
	array('label'=>'Update Rule','url'=>array('update','id'=>$model->id)),
	array('label'=>'Delete Rule','url'=>'#','linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Rule','url'=>array('admin')),
);
?>
<?php //if(Yii::app()->user->hasFlash('rule-msg')): ?>
 
<?php $this->widget('bootstrap.widgets.TbAlert'); ?>
 
<?php //endif; ?>
<h1>View Rule #<?php echo $model->id; ?></h1>
<?php $this->widget('bootstrap.widgets.TbButton', array(
    'label'=>'Toggle comment',
    'type'=>'primary', // '', 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
    'size'=>'', // '', 'large', 'small' or 'mini'
    'htmlOptions'=>array('id'=>'toggleBut'),
)); ?>
<?php 
$this->widget('bootstrap.widgets.TbDetailView',array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'gid',
		'sid',
		'ruleClass',
		'fullcontent',
		array(
		'label'=>'rulecomment',
		'type'=>'raw',
		'value'=>str_replace("\n", "<br>", CHtml::encode($model->rulecomment)),
		),
		array(
		'label'=>'Category',
		'value'=>$model->category->category,
		),
		'revision',
	),
)); ?>
<script>
$("#yw1 tbody tr:eq(5)").hide();
$('#toggleBut').click(function()
		{
	$("#yw1 tbody tr:eq(5)").slideToggle("fast");
		}
		);

</script>